/**
 * Copyright &copy; 2012-2014 <a href="https://github.cn.apestar">JeeSite</a> All rights reserved.
 */
package cn.apestar.modules.sys.entity;

import cn.apestar.common.persistence.DataEntity;
import cn.apestar.modules.sys.entity.UserAndInstituion;
import com.google.common.collect.Lists;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 用户表Entity
 * @author LVH
 * @version 2016-02-21
 */
public class WtUser extends DataEntity<WtUser> {

    private static final long serialVersionUID = 1L;

    private Long institutionId; // 注册机构ID,即租户

    private String account; // 登陆账户名

    private String password; // 密码

    private String name; // 真实姓名

    private String phone; // 联系电话

    private String regIp; // 注册IP

    private String email; // 邮件地址

    private String weixinId; // 微信Open_id

    private String nickName; // 昵称

    private String photo; // 头像

    private String userType; // 机构(org)，家长(parent)，老师(teacher)，孩子(child),校长(master)

    private String sex; // 性别 Male:男 Female：女

    private String app; // 注册app：org机构，parent家长

    private String ringId; // 环信ID

    private String newPassword; // 环信ID

    private String terminal;

    private String invitorId;

    private String identity;    //用户身份

    private String consultationMoney;       //咨询费用

    public String getConsultationMoney() {
        return consultationMoney;
    }

    public void setConsultationMoney(String consultationMoney) {
        this.consultationMoney = consultationMoney;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getInvitorId() {
        return invitorId;
    }

    public void setInvitorId(String invitorId) {
        this.invitorId = invitorId;
    }

    public String getTerminal() {
        return terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    private List<UserAndInstituion> userAndInstituionList = Lists.newArrayList(); // 表列

    public List<UserAndInstituion> getUserAndInstituionList() {

        return userAndInstituionList;
    }

    public void setUserAndInstituionList(List<UserAndInstituion> userAndInstituionList) {

        this.userAndInstituionList = userAndInstituionList;
    }

    public String getNewPassword() {

        return newPassword;
    }

    public void setNewPassword(String newPassword) {

        this.newPassword = newPassword;
    }

    public WtUser() {
        super();
    }

    public WtUser(String id) {
        super(id);
    }

    @NotNull(message = "注册机构ID,即租户不能为空")
    public Long getInstitutionId() {

        return institutionId;
    }

    public void setInstitutionId(Long institutionId) {

        this.institutionId = institutionId;
    }

    @Length(min = 1, max = 32, message = "登陆账户名长度必须介于 1 和 32 之间")
    public String getAccount() {

        return account;
    }

    public void setAccount(String account) {

        this.account = account;
    }

    @Length(min = 0, max = 32, message = "密码长度必须介于 0 和 32 之间")
    public String getPassword() {

        return password;
    }

    public void setPassword(String password) {

        this.password = password;
    }

    @Length(min = 0, max = 64, message = "真实姓名长度必须介于 0 和 64 之间")
    public String getName() {

        return name;
    }

    public void setName(String name) {

        this.name = name;
    }

    @Length(min = 0, max = 20, message = "联系电话长度必须介于 0 和 20 之间")
    public String getPhone() {

        return phone;
    }

    public void setPhone(String phone) {

        this.phone = phone;
    }

    @Length(min = 0, max = 20, message = "注册IP长度必须介于 0 和 20 之间")
    public String getRegIp() {

        return regIp;
    }

    public void setRegIp(String regIp) {

        this.regIp = regIp;
    }

    @Length(min = 0, max = 64, message = "邮件地址长度必须介于 0 和 64 之间")
    public String getEmail() {

        return email;
    }

    public void setEmail(String email) {

        this.email = email;
    }

    @Length(min = 0, max = 64, message = "微信Open_id长度必须介于 0 和 64 之间")
    public String getWeixinId() {

        return weixinId;
    }

    public void setWeixinId(String weixinId) {

        this.weixinId = weixinId;
    }

    @Length(min = 0, max = 64, message = "昵称长度必须介于 0 和 64 之间")
    public String getNickName() {

        return nickName;
    }

    public void setNickName(String nickName) {

        this.nickName = nickName;
    }

    @Length(min = 0, max = 255, message = "头像长度必须介于 0 和 255 之间")
    public String getPhoto() {

        return photo;
    }

    public void setPhoto(String photo) {

        this.photo = photo;
    }

    public String getUserType() {

        return userType;
    }

    public void setUserType(String userType) {

        this.userType = userType;
    }

    public String getSex() {

        return sex;
    }

    public void setSex(String sex) {

        this.sex = sex;
    }

    public String getApp() {

        return app;
    }

    public void setApp(String app) {

        this.app = app;
    }

    @Length(min = 0, max = 50, message = "环信ID长度必须介于 0 和 50 之间")
    public String getRingId() {

        return ringId;
    }

    public void setRingId(String ringId) {

        this.ringId = ringId;
    }

}